/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package components.shape;

import PCR.MainFrame;
import components.ShapeTipText;
import components.shapemenu.ShapeMenu;
import java.io.Serializable;
import javax.swing.ImageIcon;
import javax.swing.JLabel;

/**
 *
 * @author asmaa
 */
public class Shape extends JLabel implements Serializable {

    protected String name;

    public ShapeMenu getShapeMenu() {
        MainFrame frm = (MainFrame) java.awt.Window.getWindows()[0];
        return frm.getSelectedWorkArea().getBandsPanel().getShapeMenu();
    }

    public ShapeTipText getTipText() {
        MainFrame frm = (MainFrame) java.awt.Window.getWindows()[0];
        return frm.getSelectedWorkArea().getBandsPanel().getTipText();
    }

    public Shape() {
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getName() {
        return name;
    }
    protected ImageIcon image;

    public void setImage(ImageIcon img) {
        image = img;
        this.setIcon(img);
    }

    public ImageIcon getImage() {
        return image;
    }
    protected boolean movable;

    public void setMovable(boolean mov) {
        movable = mov;
    }

    public boolean isMovable() {
        return movable;
    }
    protected int curSample;

    public void setCurSample(int sample) {
        curSample = sample;
    }

    public int getCurSample() {
        return curSample;
    }
}